package top.alanshelby.service.impl;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
import top.alanshelby.service.UserService;

@Component("userService")
@PropertySource("classpath:demo.properties")
public class UserServiceImpl implements UserService {

    @Value("${id}")
    private String id;

    @Override
    public void saveUser() {
        System.out.println("调用 saveUser() 方法，id为：" + id);
    }
}
